﻿<%@ Page Language="C#" MasterPageFile="~/ProductManager/ProductManage.Master" AutoEventWireup="true" CodeFile="RelatedPrdt.aspx.cs" Inherits="GoShopping.Web.ProductManager.RelatedPrdt" Title="无标题页" %>
<%@ Register assembly="ExtensionGridView" namespace="ExtensionControls" tagprefix="cc1" %>
<%@ MasterType VirtualPath="~/ProductManager/ProductManage.Master"  %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <table class="style1" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td style="width: 400px">
                        关联主表<asp:DropDownList ID="ddlPrdtType" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlPrdtType_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                    <td style="width: 400px">
                        关联次表<asp:DropDownList ID="ddlPrdt1Type" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="ddlPrdt1Type_SelectedIndexChanged">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:RadioButtonList ID="rblMain" runat="server" DataTextField="Name" 
                            DataValueField="ID" RepeatColumns="3" RepeatDirection="Horizontal" 
                            RepeatLayout="Flow" Width="400px">
                        </asp:RadioButtonList>
                    </td>
                    <td>
                        <asp:CheckBoxList ID="cblVice" runat="server" DataTextField="Name" 
                            DataValueField="ID" RepeatColumns="3" RepeatDirection="Horizontal" RepeatLayout="Flow"
                            Width="400px">
                        </asp:CheckBoxList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnBindPrdt" runat="server" onclick="btnBindPrdt_Click" 
                            Text="添加" />
                    </td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
            <table class="style1">
                <tr>
                    <td>
                        关联列表</td>
                    </tr>
                    <tr>
                    <td>
                        <cc1:ExtensionGridView ID="gvRelated" runat="server" 
                            AllowPaging="True" AutoGenerateColumns="False" PagerText="当前第{0}页,共{1}页{2}条记录" 
                            RecordCount="-1" Width="800px" 
                            onpageindexchanging="gvRelated_PageIndexChanging" 
                            onrowcommand="gvRelated_RowCommand">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="cbSingle" runat="server" />
                                    </ItemTemplate>
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="cbAll" runat="server" AutoPostBack="True" 
                                            oncheckedchanged="cbAll_CheckedChanged" />
                                    </HeaderTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="相关产品">
                                    <ItemTemplate>
                                        <asp:Label ID="lblRelated1" runat="server" 
                                            Text='<%# GetPrdtName(Eval("BeRelatedPrdctID")) %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="相关产品">
                                    <ItemTemplate>
                                        <asp:Label ID="lblRelated2" runat="server" 
                                            Text='<%# GetPrdtName(Eval("TobeRelatedPrdctID")) %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField Visible="False">
                                    <ItemTemplate>
                                        <asp:Label ID="lblBe" runat="server" Text='<%# Eval("BeRelatedPrdctID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField Visible="False">
                                    <ItemTemplate>
                                        <asp:Label ID="lblToBe" runat="server" Text='<%# Eval("TobeRelatedPrdctID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <HeaderStyle HorizontalAlign="Left" />
                        </cc1:ExtensionGridView>
                    </td>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="btnDelRelationShip" runat="server" Text="删除相关产品关系" 
                            onclick="btnDelRelationShip_Click" />
                    </td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
